marko
Version:
UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.
13 lines (9 loc) • 320 B
JavaScript
import { types as t } from "@marko/compiler";
import write from "../util/html-out-write";
import withPreviousLocation from "../util/with-previous-location";
export default function (path) {
const { node } = path;
path.replaceWith(
withPreviousLocation(write`<?${t.stringLiteral(node.value)}?>`, node),
);
}